import * as XLSX from 'xlsx';

export const exportExcel = (id: string, name: string) => {
  const exportFileContent = (
    document.getElementById(id) as HTMLElement
  ).cloneNode(true);
  const wb = XLSX.utils.table_to_book(exportFileContent, { sheet: 'sheet1' });
  XLSX.writeFile(wb, `${name}.xlsx`);
};
